local Sheild = require("gameLogic.fight.fightSheild.Sheild")
local NoInjurySheild = require("gameLogic.fight.fightSheild.NoInjurySheild", Sheild)

function NoInjurySheild:ctor(id, baseId, value, element)
    NoInjurySheild.super.ctor(id, baseId, value, element)
end

function NoInjurySheild:setBackBloodParam(param)
    self._backRatio = param
end

function NoInjurySheild:beAttack(hurt, element)
    return 0
end

function NoInjurySheild:remove(battleReport)
    NoInjurySheild.super.remove(self, battleReport)
    local AttributeConst = require("const.AttributeConst")
    local maxBlood = self._entity:getAttrValue(AttributeConst.INIT_BLOOD)
    local value = math.floor(maxBlood * (self._backRatio / 1000))
    local hurt = require("gameLogic.fight.fightHurtStrategy.Hurt").new(value, false, AttributeConst.ELEMENT_TREATMENT)
    self._entity:simpleHurt(hurt, battleReport)
    battleReport:addSubHurt(hurt, self._entity, self._entity)
end

return NoInjurySheild
